<include file="header1" />
<body>
<div class="wraper">
	 <div class="load">
        <img class="load-bee" src="/assets/base/studentair/images/load-bee.png">

    </div>
	<div class="head clearfix">
		<a href="/base/studentAir/backDesc/wechat_id/{BEESCRM:$wechat_id}" class="pull-right text-right small-text">退款说明</a>
		<span class="head-name pull-right">押金退还申请</span>
	</div>
	<p class="form-list text-center">申请退还押金：<span class="price big-price">{BEESCRM:$backInfo.order_price}</span>元<br/>
		你的空调租赁已到期，是否同意由<span class="price">[{BEESCRM:$backInfo.username}]</span>代为领取？</p>
	<p class="field">租赁内容</p>
	<div class="lists tb-mode">
		<div class="tb-cell user-info">
			<p>租赁期：<span class="price">{BEESCRM:$orderInfo.year}</span>年 <span class="price">[ {BEESCRM:$orderInfo.start_time|date="Y-m-d",###} 至 {BEESCRM:$orderInfo.endtime|date="Y-m-d",###} ]</span></p>
			<p>费用：{BEESCRM:$orderInfo.money}元/台</p>
			<p>押金：{BEESCRM:$orderInfo.deposit}元/台</p>
			<p>总计：<span class="price">{BEESCRM:$orderInfo.order_price}</span>元</p>
		</div>
	</div>
	<div class="lists proposer margin-top">
		<p class="big-red">等待室友确认</p>
		<p class="stress">{BEESCRM:$agree}人确认同意，剩余{BEESCRM:$wait}人等待确认...</p>
		<div class="tb-mode ziduan">
			<p class="tb-cell first">姓名</p>
			<p class="tb-cell second">学号</p>
			<p class="tb-cell third">手机号</p>
			<p class="tb-cell forth">状态</p>
		</div>
		<div class="tb-mode">
			<p class="tb-cell first">{BEESCRM:$orderInfo.username}</p>
			<p class="tb-cell second">{BEESCRM:$orderInfo.student_num}</p>
			<p class="tb-cell third">{BEESCRM:$orderInfo.mobile}</p>
			<p class="tb-cell forth blue">发起人</p>
		</div>
		<volist name="joinInfo" id="vo">
		<div class="tb-mode">
			<p class="tb-cell first">{BEESCRM:$vo.username}</p>
			<p class="tb-cell second">{BEESCRM:$vo.student_num}</p>
			<p class="tb-cell third">{BEESCRM:$vo.mobile}</p>
			<if condition="$vo['status'] eq 0">
				<p class="tb-cell forth">待确认</p>
			</if>

			<if condition="$vo['status'] eq 1">
				<p class="tb-cell forth green">已同意</p>
			</if>

			<if condition="$vo['status'] eq 2">
				<p class="tb-cell forth" style="color: red;">不同意</p>
			</if>
		</div>
		</volist>
	</div>
	<if condition="$userStatus eq 0">
	<div class="btn-box clearfix">
		<input type="hidden" value="{BEESCRM:$backJoinId}" id="back_join_id">
		<input type="hidden" value="{BEESCRM:$backOrderId}" id="back_order_id">
		<a href="javascript:void(0);" class="btn half-btn" data-status="0">不同意</a>
		<a href="javascript:void(0);" class="btn half-btn" data-status="1">同意</a>
	</div>
	</if>
	<div class="bottom-box">
		<p class="copyright">杭州青橄榄网络技术有限公司 技术支持</p>
	</div>
</div>
<include file="commonJs" />
<script>
	var height = $(window).height();
	var bottombox_height = $('.bottom-box').outerHeight();
	$('.wraper').css("minHeight",height);
	$('.wraper').css("paddingBottom",bottombox_height);

	$(window).load(function(){
		$('.load').hide();
	})
	$(function(){
		$('.xieyi').click(function(){
			$(this).find('.iconfont').toggleClass('icon-xuanzedianjihou');
		})
	})

	$('.half-btn').on('click',function(){
		var status = $(this).data('status');
		var back_join_id = $('#back_join_id').val();
		var back_order_id = $('#back_order_id').val();
		if(status == 0){
			$.confirm("确定不同意退押金给发起人吗？", drop);
		}else if(status == 1){
			$.confirm("确定同意退押金给发起人吗？", drop);
		}
		function drop() {
			var data = {};
			var json = {};
			data.val = status;
			data.back_join_id = back_join_id;
			data.back_order_id = back_order_id;
			json.data = data;
			json.url = '/base/studentAir/ajaxConfirm';
			json.method = 'post';
			json.type = 'json';
			$.getAjax(json, true, reload, '');
		}
	});

	//页面刷新
	function reload(){
		setTimeout('location.reload()',2000);
	}
</script>
</body>
</html>
